<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: Iterator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1_iterator.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Iterator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classarm__compute_1_1_iterator.xhtml" title="Iterator updated by execute_window_loop for each window element. ">Iterator</a> updated by <a class="el" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a> for each window element.  
 <a href="classarm__compute_1_1_iterator.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a45381773d6cba2ad9e9d2d04515fa40b"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">Iterator</a> ()</td></tr>
<tr class="memdesc:a45381773d6cba2ad9e9d2d04515fa40b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor to create an empty iterator.  <a href="#a45381773d6cba2ad9e9d2d04515fa40b">More...</a><br /></td></tr>
<tr class="separator:a45381773d6cba2ad9e9d2d04515fa40b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d6469b972ef1e52b55b1ad7da70b02"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a92d6469b972ef1e52b55b1ad7da70b02">Iterator</a> (const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *tensor, const <a class="el" href="classarm__compute_1_1_window.xhtml">Window</a> &amp;window)</td></tr>
<tr class="memdesc:a92d6469b972ef1e52b55b1ad7da70b02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a container iterator for the metadata and allocation contained in the <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor. ">ITensor</a>.  <a href="#a92d6469b972ef1e52b55b1ad7da70b02">More...</a><br /></td></tr>
<tr class="separator:a92d6469b972ef1e52b55b1ad7da70b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a6e507a84d19ad08bb0f7fc1558ec429a">increment</a> (size_t dimension)</td></tr>
<tr class="memdesc:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment the iterator along the specified dimension of the step value associated to the dimension.  <a href="#a6e507a84d19ad08bb0f7fc1558ec429a">More...</a><br /></td></tr>
<tr class="separator:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8760d21bd43ac13bd26489b7736245b3"><td class="memItemLeft" align="right" valign="top">constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a8760d21bd43ac13bd26489b7736245b3">offset</a> () const </td></tr>
<tr class="memdesc:a8760d21bd43ac13bd26489b7736245b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the offset in bytes from the first element to the current position of the iterator.  <a href="#a8760d21bd43ac13bd26489b7736245b3">More...</a><br /></td></tr>
<tr class="separator:a8760d21bd43ac13bd26489b7736245b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeabcf37a281d780c90ebe812149a7a84"><td class="memItemLeft" align="right" valign="top">constexpr uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#aeabcf37a281d780c90ebe812149a7a84">ptr</a> () const </td></tr>
<tr class="memdesc:aeabcf37a281d780c90ebe812149a7a84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a pointer to the current pixel.  <a href="#aeabcf37a281d780c90ebe812149a7a84">More...</a><br /></td></tr>
<tr class="separator:aeabcf37a281d780c90ebe812149a7a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599f5025b7e6b8bfead740a88e56d5bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a599f5025b7e6b8bfead740a88e56d5bc">reset</a> (size_t dimension)</td></tr>
<tr class="memdesc:a599f5025b7e6b8bfead740a88e56d5bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the iterator back to the beginning of the specified dimension.  <a href="#a599f5025b7e6b8bfead740a88e56d5bc">More...</a><br /></td></tr>
<tr class="separator:a599f5025b7e6b8bfead740a88e56d5bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classarm__compute_1_1_iterator.xhtml" title="Iterator updated by execute_window_loop for each window element. ">Iterator</a> updated by <a class="el" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a> for each window element. </p>

<p>Definition at line <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00284">284</a> of file <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a45381773d6cba2ad9e9d2d04515fa40b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr <a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor to create an empty iterator. </p>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00135">135</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    : _ptr(<span class="keyword">nullptr</span>), _dims()</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;{</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a92d6469b972ef1e52b55b1ad7da70b02"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classarm__compute_1_1_window.xhtml">Window</a> &amp;&#160;</td>
          <td class="paramname"><em>window</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a container iterator for the metadata and allocation contained in the <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor. ">ITensor</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tensor</td><td>The tensor to associate to the iterator. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window which will be used to iterate over the tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00140">140</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00263">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#ab988210662dbd3bf32fd563c7dd1bdbf">ITensor::buffer()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">arm_compute::test::validation::info()</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
<div class="fragment"><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    : <a class="code" href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">Iterator</a>()</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;{</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor-&gt;info() == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="keyword">const</span> ITensorInfo *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">info</a>    = tensor-&gt;info();</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keyword">const</span> Strides     &amp;strides = info-&gt;strides_in_bytes();</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    _ptr = tensor-&gt;buffer() + info-&gt;offset_first_element_in_bytes();</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="comment">//Initialize the stride for each dimension and calculate the position of the first element of the iteration:</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; info-&gt;num_dimensions(); ++n)</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    {</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        _dims[n]._stride = win[n].step() * strides[n];</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        std::get&lt;0&gt;(_dims)._dim_start += strides[n] * win[n].start();</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    }</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="comment">//Copy the starting point to all the dimensions:</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 1; n &lt; <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>; ++n)</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    {</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        _dims[n]._dim_start = std::get&lt;0&gt;(_dims)._dim_start;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    }</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="_validate_8h.xhtml#af5084ef537306d09b1ef82aed5d1f63f">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a>(win, info-&gt;num_dimensions());</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a096668313a9a819d54a2e65ec21ff0cc"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">arm_compute::test::validation::info</a></div><div class="ttdeci">src info() -&gt; set_format(Format::S16)</div></div>
<div class="ttc" id="classarm__compute_1_1_iterator_xhtml_a45381773d6cba2ad9e9d2d04515fa40b"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">arm_compute::Iterator::Iterator</a></div><div class="ttdeci">constexpr Iterator()</div><div class="ttdoc">Default constructor to create an empty iterator. </div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00135">Helpers.inl:135</a></div></div>
<div class="ttc" id="_validate_8h_xhtml_af5084ef537306d09b1ef82aed5d1f63f"><div class="ttname"><a href="_validate_8h.xhtml#af5084ef537306d09b1ef82aed5d1f63f">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE(w, md)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00263">Validate.h:263</a></div></div>
<div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6e507a84d19ad08bb0f7fc1558ec429a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void increment </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dimension</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Increment the iterator along the specified dimension of the step value associated to the dimension. </p>
<dl class="section warning"><dt>Warning</dt><dd>It is the caller's responsibility to call increment(dimension+1) when reaching the end of a dimension, the iterator will not check for overflow.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>When incrementing a dimension 'n' the coordinates of all the dimensions in the range (0,n-1) are reset. For example if you iterate over a 2D image, everytime you change row (dimension 1), the iterator for the width (dimension 0) is reset to its start.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dimension</td><td>Dimension to increment </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00167">167</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
<div class="fragment"><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;{</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(dimension &gt;= <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>);</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    _dims[dimension]._dim_start += _dims[dimension]._stride;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; dimension; ++n)</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        _dims[n]._dim_start = _dims[dimension]._dim_start;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
<div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8760d21bd43ac13bd26489b7736245b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int offset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the offset in bytes from the first element to the current position of the iterator. </p>
<dl class="section return"><dt>Returns</dt><dd>The current position of the iterator in bytes relative to the first element. </dd></dl>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00179">179</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;{</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">return</span> _dims.at(0)._dim_start;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aeabcf37a281d780c90ebe812149a7a84"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr uint8_t * ptr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return a pointer to the current pixel. </p>
<dl class="section warning"><dt>Warning</dt><dd>Only works if the iterator was created with an <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor. ">ITensor</a>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>equivalent to buffer() + <a class="el" href="classarm__compute_1_1_iterator.xhtml#a8760d21bd43ac13bd26489b7736245b3" title="Return the offset in bytes from the first element to the current position of the iterator. ">offset()</a> </dd></dl>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00184">184</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>

<p>Referenced by <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00918">arm_compute::colorconvert_rgb_to_iyuv()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00875">arm_compute::colorconvert_rgb_to_nv12()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00312">arm_compute::colorconvert_rgb_to_rgbx()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00962">arm_compute::colorconvert_rgb_to_yuv4()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00343">arm_compute::colorconvert_rgbx_to_rgb()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00698">arm_compute::colorconvert_yuyv_to_iyuv()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00546">arm_compute::colorconvert_yuyv_to_nv12()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00374">arm_compute::colorconvert_yuyv_to_rgb()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00936">arm_compute::utils::compare_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00318">PPMLoader::fill_image()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00405">PPMLoader::fill_planar_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00882">arm_compute::utils::fill_random_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00835">arm_compute::utils::load_trained_data()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00763">arm_compute::utils::save_to_npy()</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00682">arm_compute::utils::save_to_ppm()</a>.</p>
<div class="fragment"><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;{</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> _ptr + _dims.at(0)._dim_start;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a599f5025b7e6b8bfead740a88e56d5bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void reset </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dimension</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move the iterator back to the beginning of the specified dimension. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dimension</td><td>Dimension to reset </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00189">189</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
<div class="fragment"><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;{</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(dimension &gt;= <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a> - 1);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    _dims[dimension]._dim_start = _dims[dimension + 1]._dim_start;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; dimension; ++n)</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    {</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        _dims[n]._dim_start = _dims[dimension]._dim_start;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
<div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/core/<a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a></li>
<li>arm_compute/core/<a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:42 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
